package im.starchat.chat.rest.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by liuchao on 3/15/16.
 */
public class RoomBean implements Parcelable {

    private int id;
    private String name;
    private String description;
    private String cover;
    private int users_count;
    private int watchers_count;
    private int praises_count;
    private int popularity;
    //单位秒
    private int duration;
    private String start_at;
    private String end_at;
    private String status;
    private String tencent_group_id;
    //腾讯上传文件id
    private String tencent_file_id;
    private UserBean user;
    private String tencent_video_url;
    private int barrage_amount;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public int getUsers_count() {
        return users_count;
    }

    public void setUsers_count(int users_count) {
        this.users_count = users_count;
    }

    public int getWatchers_count() {
        return watchers_count;
    }

    public void setWatchers_count(int watchers_count) {
        this.watchers_count = watchers_count;
    }

    public int getPraises_count() {
        return praises_count;
    }

    public void setPraises_count(int praises_count) {
        this.praises_count = praises_count;
    }

    public int getPopularity() {
        return popularity;
    }

    public void setPopularity(int popularity) {
        this.popularity = popularity;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public String getStart_at() {
        return start_at;
    }

    public void setStart_at(String start_at) {
        this.start_at = start_at;
    }

    public String getEnd_at() {
        return end_at;
    }

    public void setEnd_at(String end_at) {
        this.end_at = end_at;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getTencent_group_id() {
        return tencent_group_id;
    }

    public void setTencent_group_id(String tencent_group_id) {
        this.tencent_group_id = tencent_group_id;
    }

    public String getTencent_file_id() {
        return tencent_file_id;
    }

    public void setTencent_file_id(String tencent_file_id) {
        this.tencent_file_id = tencent_file_id;
    }

    public void setTencentVideoUrl(String videoUrl) {
        tencent_video_url = videoUrl;
    }

    public String getTencentVideoUrl() {
        return tencent_video_url;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public String getTencent_video_url() {
        return tencent_video_url;
    }

    public void setTencent_video_url(String tencent_video_url) {
        this.tencent_video_url = tencent_video_url;
    }

    public int getBarrage_amount() {
        return barrage_amount;
    }

    public void setBarrage_amount(int barrage_amount) {
        this.barrage_amount = barrage_amount;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.name);
        dest.writeString(this.description);
        dest.writeString(this.cover);
        dest.writeInt(this.users_count);
        dest.writeInt(this.watchers_count);
        dest.writeInt(this.praises_count);
        dest.writeInt(this.popularity);
        dest.writeInt(this.duration);
        dest.writeString(this.start_at);
        dest.writeString(this.end_at);
        dest.writeString(this.status);
        dest.writeString(this.tencent_group_id);
        dest.writeString(this.tencent_file_id);
        dest.writeParcelable(this.user, 0);
        dest.writeString(this.tencent_video_url);
        dest.writeInt(this.barrage_amount);
    }

    public RoomBean() {
    }

    protected RoomBean(Parcel in) {
        this.id = in.readInt();
        this.name = in.readString();
        this.description = in.readString();
        this.cover = in.readString();
        this.users_count = in.readInt();
        this.watchers_count = in.readInt();
        this.praises_count = in.readInt();
        this.popularity = in.readInt();
        this.duration = in.readInt();
        this.start_at = in.readString();
        this.end_at = in.readString();
        this.status = in.readString();
        this.tencent_group_id = in.readString();
        this.tencent_file_id = in.readString();
        this.user = in.readParcelable(UserBean.class.getClassLoader());
        this.tencent_video_url = in.readString();
        this.barrage_amount = in.readInt();
    }

    public static final Parcelable.Creator<RoomBean> CREATOR = new Parcelable.Creator<RoomBean>() {
        public RoomBean createFromParcel(Parcel source) {
            return new RoomBean(source);
        }

        public RoomBean[] newArray(int size) {
            return new RoomBean[size];
        }
    };
}
